﻿CREATE TABLE [dbo].[ColorSpectrum]
(
	[Id] BIGINT NOT NULL IDENTITY(1,1) PRIMARY KEY,
	[ImageAnalysisId] BIGINT NOT NULL,
	[DefinitionId] BIGINT NOT NULL,
	[AverageDistance] FLOAT NOT NULL,
	[PercentWithinDistance] FLOAT NOT NULL,
	[AverageHueDistance] FLOAT NOT NULL,
	[SectionX] INT NOT NULL,
	[SectionY] INT NOT NULL,
	CONSTRAINT [FK_ColorSpectrum_ImageAnalysis] FOREIGN KEY ([ImageAnalysisId])
		REFERENCES [dbo].[ImageAnalysis] ([Id]) ON DELETE CASCADE ON UPDATE NO ACTION,
	CONSTRAINT [FK_ColorSpectrum_Definition] FOREIGN KEY ([DefinitionId])
		REFERENCES [dbo].[ColorSpectrumDefinition] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
)
